How to find an integrating factor